<div ng-controller="appmonitorController">
	
	<div class="row">
		<div class="col-md-5 col-md-offset-7">
			<div style="text-align:right;">
			    <input type="text" class="form-control" ng-model="newMonitor.monitor" placeholder="userid" style="display: inline;max-width: 195px;width:63%">
	  			<button type="submit" class="btn btn-primary" ng-click="addMonitor();" style="max-width:150px;width:35%;margin-top:-3px;">添加监控对象</button>
			</div>
		</div>
	</div>

	<div class="row" style="margin-top:10px;margin-bottom:10px;">
		<div class="col-md-12">
			<div ng-if="monitors == null">
				<div class="alert alert-info" role="alert" style="text-align: center;">加载中...</div>
			</div>
			<div ng-if="monitors != null && monitors.length == 0">
				<div class="alert alert-warning" role="alert" style="text-align: center;">没有监控对象</div>
			</div>
			<div class="list-group">
			  <a ng-repeat="(index, monitor) in monitors" ng-click="showLogs(monitor);" class="list-group-item">
			  	<div style="max-width:200px;width:40%;float: left;">{{monitor.monitor}}</div>
			  	<div style="display:inline;">{{monitor.monitoring ? "监控中" : "未监控"}}</div>
			    <span ng-if="!monitor.monitoring" style="float:right;cursor:pointer;" class="glyphicon glyphicon-trash" ng-click="delMonitor($event, monitor);"></span>
			  </a>
			</div>
		</div>
	</div>

</div>
